//
//  MCOptionsSelectView.h
//  DemoTest
//
//  Created by Anson on 14-11-27.
//  Copyright (c) 2014年 Anson. All rights reserved.
//

#import <UIKit/UIKit.h>

@class MCOptionsSelectView;

@interface MCOptionSelectViewItem : NSObject

@property (copy, nonatomic) NSString *title;
@property (copy, nonatomic) NSString *value;
@property (assign, nonatomic) BOOL checked;

- (instancetype)initWithTitle:(NSString *)title value:(NSString *)val;
@end

@protocol MCOptionsSelectViewDelegete <NSObject>
@optional
- (void)theMCOptionsSelectView:(MCOptionsSelectView *)view confirmList:(NSArray *)optionList;

@end

@interface MCOptionsSelectView : UIView

@property (weak, nonatomic) id<MCOptionsSelectViewDelegete> delegate;
@property (assign) NSInteger columns;//列数
@property (readonly, nonatomic) NSMutableArray *optionItemList;
@property (assign, nonatomic) BOOL multiSelect;
@property (assign, nonatomic) NSInteger optionItemCheckedIndex;

//- (instancetype)initWithDelegate:(id<MCOptionsSelectViewDelegete>)delegate;
- (instancetype)initWithFrame:(CGRect)frame delegate:(id<MCOptionsSelectViewDelegete>)delegate;
- (void)showInView:(UIView *)view;

- (void)addOptionItemTitle:(NSString *)title value:(NSString *)val;
- (void)addOptionItem:(MCOptionSelectViewItem *)item;

@end
